<!DOCTYPE html>

<html>

	<head>

		<meta charset="utf-8" />

		<title>首页</title>

		<meta name="keywords" content="" />

		<meta name="description" content="" />

		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />

		<meta name="format-detection" content="telephone=no" />

		<meta name="apple-mobile-web-app-capable" content="yes" />

		<meta name="apple-mobile-web-app-status-bar-style" content="black">

		

		<link rel="stylesheet" href="__TMPL__/public/assets1/css/mui.min.css" />

		<link rel="stylesheet" href="__TMPL__/public/assets1/css/style.css" />

		<script type="text/javascript" src="__TMPL__/public/assets1/js/jquery.1.9.1.js" ></script>

		<script type="text/javascript" src="__TMPL__/public/assets1/js/rem.js" ></script>

		

		<script>

			window.onload = function() { 

				$(".load").removeClass("load"); 

			}; 

		</script>

	</head>

	<body>

		<!--加载遮罩-->

		<div class="load"></div>

		

		<div class="index">

			<div class="title">

				<h2>查找学校</h2>

			</div>

			<div class="t-zw"></div>

			

			<div class="school">


				<p class="sm-p1">查找学校并新建排期</p>

				<div class="sm-form">

					<input type="text" placeholder="请输入学校名称关键词" id="name" value="" />

					<button type="button" class="mui-btn" id="sou">搜索</button>

				</div>

				<div class="sm-list">

					<p class="sm-p2">查询和修改</p>

					<ul id="ul">
						
				
						
						
					</ul>

				</div>

			</div>

			

		</div>

		<script type="text/javascript" src="__TMPL__/public/assets1/js/doT.js" ></script>

		<script type="text/x-dot-template" id="data_1">

			[[?it.names == '']]

				<li><a href=""></a></li>

			[[??]]
			[[~it.names:val:key]]
				<li><a href="../index/details?id=[[=val.id]]">[[=val.name]]</a></li>
			[[~]]
				

			

			[[?]]

		</script>

		<script type="text/javascript">
			$(function(){
					$("#sou").click(function() {
						
						var formData = new FormData;


					    var name = $('#name').val();
					    formData.append('name',name);

						$.ajax({
							type: "POST",
							url:"{:url('index/getSchoolList')}",
							
							data: formData,
							

                			async:'true',  
						  	 
                			cache: false,
							processData: false,  

							contentType: false,
							success: function(data) {
								if (data.code == 1) {
									
								var Text = doT.template($('#data_1').text())

	           					 mui("#ul")[0].innerHTML = Text(data.data);
	           					 console.log(data);
							 	
							 	 
							}
							}
						});


				})

			 })
		</script>


		

		<script type="text/javascript" src="__TMPL__/public/assets1/js/mui.min.js" ></script>

		<script type="text/javascript" src="__TMPL__/public/assets1/js/public.js" ></script>

	</body>

</html>

